﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Coco.Library.Globalization
{
    public class ChineseCalenderInfoCollection
    {
        public static readonly string[] ChineseMonths = new string[] { "正", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "腊" };
        public static readonly string[] ChineseDays = new string[] { "初一", "初二", "初三", "初四", "初五", "初六", "初七", "初八", "初九", "初十", "十一", "十二", "十三", "十四", "十五", "十六", "十七", "十八", "十九", "二十", "廿一", "廿二", "廿三", "廿四", "廿五", "廿六", "廿七", "廿八", "廿九", "三十" };

        public static readonly string[] ChineseNumber = new string[] { "〇", "一", "二", "三", "四", "五", "六", "七", "八", "九" };
        public static readonly string[] CelestialStem = new string[] { "庚", "辛", "壬", "癸", "甲", "乙", "丙", "丁", "戊", "己" };
        public static readonly string[] TerrestrialBranch = new string[] { "申", "酉", "戌", "亥", "子", "丑", "寅", "卯", "辰", "巳", "午", "未" };
        public static readonly string[] Animals = new string[] { "猴", "鸡", "狗", "猪", "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊" };
        public static readonly string[] ChineseWeekName = new string[] { "星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };

        public static string GetTerrestrialBranch(DateTime date)
        {
            int t_index = int.Parse(date.Year.ToString().Remove(0, date.Year.ToString().Length - 1));
            string t = CelestialStem[t_index];

            int b_index = date.Year % 12;
            string b = TerrestrialBranch[b_index];

            return t + b;
        }

        public static string GetAnimal(DateTime date)
        {
            return Animals[date.Year % 12];
        }
    }
}
